package org.csmzxy.class2333.file;
import java.io.*;

public class Example14 {
    public static void main(String[] args) throws IOException{
       FileInputStream fis = new FileInputStream("src\\text05.txt");
       FileOutputStream fos = new FileOutputStream("src\\text05copy.txt");
       byte[] buffer = new byte[1024];
       int len;
       while ((len = fis.read(buffer)) != -1){
           fos.write(buffer,0,len);
       }
       fis.close();
       fos.close();
       System.out.println("文件复制成功!");
    }
}
